Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Storage Messages


GXShutDown

QuickDraw GX sends the GXShutDown message at the end of a print job. You can override the GXShutDown message to clean up or dispose of any private storage you allocated in your override of the GXInitialize message. Your override of the Shutdown message must match the following formal declaration:

OSErr MyShutDown (void);
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX sends the GXShutDown message after a print job is complete. The printing context still exists when this message is sent.

You need to override this message to deallocate any storage you were using within the context of the print job and deallocate the handle you placed into the context as a result of the GXInitialize message. The GXShutDown message is always the last message a message handler receives before it is removed from the message chain.

The default implementation of the GXShutDown message deallocates memory that was allocated by the printing system.

SPECIAL CONSIDERATIONS
You need to override the GXShutDown message and deallocate storage if you have also overridden the GXInitialize message.

You never send the GXShutDown message yourself.

You never forward the GXShutDown message to other message handlers.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
memFullErrThere is not enough memory to retrieve the
tagged data.
resNotFoundThe specified data could not be found.
SEE ALSO
You can find examples of overrides of the GXShutDown message in Listing 2-18 on page 2-31 in the chapter "Printing Extensions" and in Listing 3-18 on page 3-48 in the chapter "Printer Drivers."

The GXInitialize message is described in the previous section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help